// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Xunit;

namespace System.Reflection.Emit.Tests
{
    public class TypeBuilderGenericParameterAttributes
    {
        [Fact]
        public void GenericParameterAttributes_ReturnsNone()
        {
            TypeBuilder type = Helpers.DynamicType(TypeAttributes.NotPublic);
            GenericTypeParameterBuilder[] genericParameters = type.DefineGenericParameters("T");
            genericParameters[0].SetGenericParameterAttributes(GenericParameterAttributes.SpecialConstraintMask);
            GenericParameterAttributes gpa = genericParameters[0].DeclaringType.GetTypeInfo().GenericParameterAttributes;
            Assert.Equal(GenericParameterAttributes.None, gpa);
        }
    }
}
